package com.bwie.controller;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.service.SysService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: SysController
 * @Description: TODO
 * @version: v1.８.0
 * @author: GONGWENXUE
 * @date: 2025/11/10 10:16
 */
@Controller
@RestController
@RequestMapping("sys")
public class SysController {
    @Autowired
    SysService sysService;
    /**
     * 账号登陆 用户名和密码登录用户名和密码登录
     */
    @GetMapping("selectNameByUser/{username}")
    public Result<User> selectPhoneByUser(@PathVariable("username") String username){
        User user=sysService.selectPhoneByUser(username);
        return Result.success(user);
    }
}
